<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>test-hbs-{{id}}</title>
</head>
<body>
  <form action="/shared/form-submit" method='post' target="test-frame" id="myForm">
    <input type="text" name="username">
    <input type="text" name="password">
  </form>
  <iframe style="display: none;" frameborder="0" name="test-frame"></iframe>
  <button id="submit">submit</button>
  <script>
    const form = document.querySelector("#myForm")
    form.addEventListener('submit', (event) => {
      console.error("submit", event)
    // Add code for functionality you need here
    })
    document.querySelector("#submit").addEventListener("click", function() {
      console.error("triggerSubmit")
      form.submit()
    })
  </script>
</body>
</html>